﻿using UnityEngine;
using System.Collections;

public class FollowTarget : MonoBehaviour {

    public Transform targetObj;
    
	// Update is called once per frame
	void Update () {
        Vector3 pos = transform.position;
        pos.x = targetObj.position.x;
        pos.y = targetObj.position.y;
        transform.position = pos;
	}
}
